package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.Date;

@Mapper
public interface OrderSettingDao {
    @Select("select * from t_ordersetting where orderDate = #{date}")
    OrderSetting findByOrderDate(LocalDate date);

    @Update("update t_ordersetting SET reservations = #{reservations} WHERE orderDate = #{orderDate}")
    void editNumberByOrderDate(LocalDate orderDate, int reservations);
}
